package com.boarsoft.message.test;

import com.boarsoft.message.bean.Message;
import com.boarsoft.message.core.Messenger;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TxMsgService {

    @Transactional
    public void sendTxMsg() {
        Message m = new Message();
        m.setTarget("queueTx");
        m.setContent("hello");
        try {
            Messenger.send(m);
            Thread.sleep(1);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
